Switching to the composer-managed upstream

I have questions about the Terminus Conversion Tools Plugin.

I would like to try to use this tool to convert my Drupal 9 websites from using the deprecated upstreams to the composer managed upstream. My sites are already managed via composer; the only reason I am doing this is because the documentation recommends doing so as a pre-requisite for upgrading from Drupal 9 to Drupal 10. I wouldn’t do this otherwise.

Question 1: Can someone confirm that the terminus command I need to use is conversion:update-from-deprecated-upstream?

Question 2: If this goes poorly (as I expect it might, given previous attempts to change upstream), can I run conversion:restore-dev to undo the change?

Question 3: Is multidev required for this? I only have basic hosting, so I don’t have multidev.

1 Like

Hey @aaron! :wave:

Looks like we missed this here in the Hub but it looks like @jsulz & @kevin.porras.pantheon.io were able to jump in and help you over in our Community Slack. Phewww!

If you have any other questions please let one of us know! :slight_smile:

Some followup here. The Terminus conversion tool is for use only if you have multi-dev. If you don’t (like me) you need to do the upstream change manually using the instructions documented at https://docs.pantheon.io/switch-drupal-recommended-upstream

A couple of notes about the manual process from my own experience:

(1) The last step, after switching upstreams, where you go to the dashboard and apply updates, didn’t work for me and I’m not sure exactly how it would work for anyone unless they have made few or no customizations of their website. Also, if the update fails, you will not know why. I see no place in the dashboard to view error details. So you may need to manually merge the upstream updates (as explained in the last part of the documentation page).

(2) Manual merge of the upstream is a little scary, or at least it was for me. There are two key changes that cause this that seem to be easily reversible:

  • the merge will change the directory names for contrib code from **/composer to **/contrib. This is unnecessary. You can revert this change by editing the .gitignore file and the composer.json file

  • the merge may wipe out most customizations to your composer.json file – including patches, required contrib modules, etc. I had to restore a previous version of my composer.json file and then review each individual change made by the merge to retain only those that are essential to the change of upstream.

After some trial and error (not described here) I was able to complete the upstream change. Hopefully some of this information will be helpful to others.

1 Like

Hey Aaron! Thanks for popping back in here to share this with the team & broader community. :star2:

I let our Docs gurus know you bumped into this & they agreed we should definitely make some improvements to this Doc! Would you mindopening an issue with this Doc? Since you experienced this & were able to solve for it best we would love for you to share this!

Hello, I was just looking at this issue and would love some clarification. I have a d9 site, no multi-dev, that is all ready for updating to D10. The instructions on your site don’t seem to match what I have seen in your Slack discussions. The documentation here(https://docs.pantheon.io/upgrade-drupal-8-ic-to-drupal-9#set-drupal-core-version) makes it look like all I need to do is composer require drupal 10, but I have seen elsewhere that I need to remove pantheon-upstreams/upstream-configuration from my composer.json file and then manually update the upstream-configuration/composer.json file to Drupal 10 first? Is that correct? Thank you for your help.

1 Like

Hey Alison! :wave:

I just shared this with some team members internally to see if they can clear up any confusion here. And of course so we can make changes to that Doc if needed so other customers like you don’t bump into the same issues/questions. So hang tight!

1 Like